package
{
	import content.ApplicationDomainExample;
	import content.FileListView;
	import content.UiManege;
	
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.net.URLLoader;
	import flash.net.URLRequest;
	
	

	// --------------MSN:lation_pan@live.cn  QQ: 3423526------------- //
	[SWF(backgroundColor="#008c8e", frameRate="60", width="1024", height="600")]
	public class modelEdit extends Sprite
	{
		private var _fileListView:FileListView;

		public function modelEdit()
		{
			
			this.addEventListener(Event.ADDED_TO_STAGE, addToStage)
		}
		
		
		private function addToStage(evt:Event):void
		{
			UiManege.stage=this.stage;
			UiManege.uiSwf=new ApplicationDomainExample();
			UiManege.uiSwf.baceFun=loadUIok;
		}
		public function loadUIok():void
		{
			addView();
		}
		
		private function addView():void
		{
		
			_fileListView=new FileListView();	
			_fileListView.x=500;
			_fileListView.y=100;
			addChild(_fileListView);
			UiManege.fileListView=_fileListView;
			loadXmlData();

			
		}
		private function loadXmlData():void
		{
			//加载地面XML列表
			var _loaderURL:URLRequest = new URLRequest("buildeditstatList.xml");
			var _scenexml:URLLoader=new URLLoader();
			_scenexml.load(_loaderURL);
			_scenexml.addEventListener(Event.COMPLETE, _loadGroundXmlOk);
			function _loadGroundXmlOk(event:Event):void
			{  
				_fileListView.upDataXml(XML(_scenexml.data));
			}
	
		}
	}
}